Public Class PublicFunctions

    Public Class PublicFunctions

        Shared Function SqlReplaceText(ByVal strSql As String) As String
            Dim strFixedSQL As String

            strFixedSQL = strSql
            'strFixedSQL = Replace(strFixedSQL, "'", "")
            strFixedSQL = Replace(strFixedSQL, "[", "")
            strFixedSQL = Replace(strFixedSQL, "%", "")
            'strFixedSQL = Replace(strFixedSQL, "_", "[_]") 
            'some people may have underscores in their email address
            strFixedSQL = Replace(strFixedSQL, "--", "")
            strFixedSQL = Trim(strFixedSQL)

            If strFixedSQL = "" Then
                strFixedSQL = " "
            End If
            'return the fixed sql
            SqlReplaceText = strFixedSQL
        End Function

        Shared Function Return_YesNo_Array() As DataTable
            Dim dt As New DataTable
            Dim dr As DataRow

            dt.Columns.Add(New DataColumn("ID", GetType(String)))
            dt.Columns.Add(New DataColumn("Description", GetType(String)))

            dr = dt.NewRow()
            dr(0) = "0"
            dr(1) = "Y"
            dt.Rows.Add(dr)
            dr = dt.NewRow()
            dr(0) = "1"
            dr(1) = "N"
            dt.Rows.Add(dr)

            Return dt
        End Function

        Shared Function Return_CourseTypes_Array() As DataTable
            Dim dt As New DataTable
            Dim dr As DataRow

            dt.Columns.Add(New DataColumn("ID", GetType(String)))
            dt.Columns.Add(New DataColumn("Description", GetType(String)))

            dr = dt.NewRow()
            dr(0) = "0"
            dr(1) = "---Select---"
            dt.Rows.Add(dr)
            dr = dt.NewRow()
            dr(0) = "CATNII"
            dr(1) = "CATNII"
            dt.Rows.Add(dr)
            dr = dt.NewRow()
            dr(0) = "ENPC"
            dr(1) = "ENPC"
            dt.Rows.Add(dr)
            dr = dt.NewRow()
            dr(0) = "TNCC"
            dr(1) = "TNCC"
            dt.Rows.Add(dr)
            dr = dt.NewRow()
            dr(0) = "P-CTAS"
            dr(1) = "P-CTAS"
            dt.Rows.Add(dr)
            dr = dt.NewRow()
            dr(0) = "A-CTAS"
            dr(1) = "A-CTAS"
            dt.Rows.Add(dr)

            Return dt
        End Function

        Shared Function Return_Involvement_Array() As DataTable
            Dim dt As New DataTable
            Dim dr As DataRow

            dt.Columns.Add(New DataColumn("ID", GetType(String)))
            dt.Columns.Add(New DataColumn("Description", GetType(String)))

            dr = dt.NewRow()
            dr(0) = "Provider"
            dr(1) = "Provider"
            dt.Rows.Add(dr)
            dr = dt.NewRow()
            dr(0) = "Instructor"
            dr(1) = "Instructor"
            dt.Rows.Add(dr)

            Return dt
        End Function

        Shared Function Return_Country_Array() As DataTable
            Dim dt As New DataTable
            Dim dr As DataRow

            dt.Columns.Add(New DataColumn("ID", GetType(String)))
            dt.Columns.Add(New DataColumn("Description", GetType(String)))

            dr = dt.NewRow()
            dr(0) = "0"
            dr(1) = "---Select---"
            dt.Rows.Add(dr)
            dr = dt.NewRow()
            dr(0) = "Canada"
            dr(1) = "Canada"
            dt.Rows.Add(dr)

            Return dt
        End Function

        Shared Function Return_10s_Array() As DataTable
            Dim dt As New DataTable
            Dim dr As DataRow

            dt.Columns.Add(New DataColumn("ID", GetType(String)))
            dt.Columns.Add(New DataColumn("Description", GetType(String)))

            dr = dt.NewRow()
            dr(0) = "0"
            dr(1) = "0"
            dt.Rows.Add(dr)
            dr = dt.NewRow()
            dr(0) = "10"
            dr(1) = "10"
            dt.Rows.Add(dr)
            dr = dt.NewRow()
            dr(0) = "20"
            dr(1) = "20"
            dt.Rows.Add(dr)
            dr = dt.NewRow()
            dr(0) = "30"
            dr(1) = "30"
            dt.Rows.Add(dr)
            dr = dt.NewRow()
            dr(0) = "40"
            dr(1) = "40"
            dt.Rows.Add(dr)
            dr = dt.NewRow()
            dr(0) = "50"
            dr(1) = "50"
            dt.Rows.Add(dr)
            dr = dt.NewRow()
            dr(0) = "60"
            dr(1) = "60"
            dt.Rows.Add(dr)
            dr = dt.NewRow()
            dr(0) = "70"
            dr(1) = "70"
            dt.Rows.Add(dr)
            dr = dt.NewRow()
            dr(0) = "80"
            dr(1) = "80"
            dt.Rows.Add(dr)
            dr = dt.NewRow()
            dr(0) = "90"
            dr(1) = "90"
            dt.Rows.Add(dr)

            Return dt
        End Function

        Shared Function Return_1s_Array() As DataTable
            Dim dt As New DataTable
            Dim dr As DataRow

            dt.Columns.Add(New DataColumn("ID", GetType(String)))
            dt.Columns.Add(New DataColumn("Description", GetType(String)))

            dr = dt.NewRow()
            dr(0) = "0"
            dr(1) = "0"
            dt.Rows.Add(dr)
            dr = dt.NewRow()
            dr(0) = "1"
            dr(1) = "1"
            dt.Rows.Add(dr)
            dr = dt.NewRow()
            dr(0) = "2"
            dr(1) = "2"
            dt.Rows.Add(dr)
            dr = dt.NewRow()
            dr(0) = "3"
            dr(1) = "3"
            dt.Rows.Add(dr)
            dr = dt.NewRow()
            dr(0) = "4"
            dr(1) = "4"
            dt.Rows.Add(dr)
            dr = dt.NewRow()
            dr(0) = "5"
            dr(1) = "5"
            dt.Rows.Add(dr)
            dr = dt.NewRow()
            dr(0) = "6"
            dr(1) = "6"
            dt.Rows.Add(dr)
            dr = dt.NewRow()
            dr(0) = "7"
            dr(1) = "7"
            dt.Rows.Add(dr)
            dr = dt.NewRow()
            dr(0) = "8"
            dr(1) = "8"
            dt.Rows.Add(dr)
            dr = dt.NewRow()
            dr(0) = "9"
            dr(1) = "9"
            dt.Rows.Add(dr)

            Return dt
        End Function


    End Class

End Class
